@extends("layouts.backend.webadmin")

@section('content')
    <style>
        #searchCategory{
            border-radius:0px;}
    </style>
<link rel="stylesheet" href="{{env('APP_ROOT')}}/assets/select2/css/select2.min.css">
<link rel="stylesheet" href="{{env('APP_ROOT')}}/assets/select2/css/select2totree.css">
<link rel="stylesheet" href="{{env('APP_ROOT')}}/assets/layui/css/layui.css">
<link rel="stylesheet" href="{{env('APP_ROOT')}}/css/vulslist.css">
<script src="{{env('APP_ROOT')}}/assets/layui/layui.all.js"></script>
<script src="{{env('APP_ROOT')}}/js/common.js"></script>
<!-- Content Header (Page header) -->

<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    @if($his==1)
                        <a class="btn btn-primary" href="{{route('admin.checkoption.vuls')}}?tid={{$tid}}&ckid={{$ckid}}" role="button"><i class="fa fa-plus-square" aria-hidden="true"></i>发现漏洞</a>
                    @else
                        <a class="btn btn-primary" href="{{route('admin.checkoption.vuls')}}?tid={{$tid}}&ckid={{$ckid}}&his=1" role="button"><i class="fa fa-history" aria-hidden="true"></i>历史漏洞</a>
                    @endif
                </div>
                <div class="box-body">
                    <table width="100%" id="leveltable" class="table table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>编号</th>
                            <th>标题</th>
                            <th>提交人</th>
                            <th>所属分类</th>
                            <th>漏洞级别</th>
                            <th>状态</th>
                            {{--<th>操作</th>--}}
                        </tr>
                        </thead>
                        <tbody>
                        @foreach($list as $item)
                        <tr>
                            <td>{{$item->vuls_number}}</td>
                            <td style="word-break: break-all;"><a href="{{URL::route('admin.flaw.vulsdetail',['id'=>$item->id])}}" target="_blank">{{$item->title}} </a></td>
                            <td>{{$item->uname}}</td>
                            <td align="center">{{$item->lname}}</td>
                            <td align="center">{{$item->cname}} </td>
                            <td>{{$vulStatus[$item->status][0]}}</td>

                        </tr>
                        @endforeach
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</section>
@stop

@section('javascript-end')
    <script src="{{env('APP_ROOT')}}/assets/select2/js/select2.min.js"></script>
    <script src="{{env('APP_ROOT')}}/assets/select2/js/select2totree.js"></script>
@endsection